package com.wicket.okrapp.web.contorller;

import com.github.pagehelper.Page;
import com.wicket.okrapp.biz.service.UnstructuredDataService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 * 
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/unstructuredData/")
public class UnstructuredDataController {

  @Autowired
  UnstructuredDataService unstructuredDataService;
/**
   * D3-3批量增文档附件关系(公共)
   */
    @PostMapping("batchAddDmAttRelaCom")
    public OkrResult<BatchAddDmAttRelaComRespDto> batchAddDmAttRelaCom(@RequestBody @Validated BatchAddDmAttRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.batchAddDmAttRelaCom(reqDTO));
    }
/**
   * D3-13新增文档及文档关系(公共)
   */
    @PostMapping("addDocAndDocRelaCom")
    public OkrResult<AddDocAndDocRelaComRespDto> addDocAndDocRelaCom(@RequestBody @Validated AddDocAndDocRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.addDocAndDocRelaCom(reqDTO));
    }
/**
   * D3批量删文档附件关系(公共)
   */
    @PostMapping("batchDeleteDmAttRelaCom")
    public OkrResult<BatchDeleteDmAttRelaComRespDto> batchDeleteDmAttRelaCom(@RequestBody @Validated BatchDeleteDmAttRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.batchDeleteDmAttRelaCom(reqDTO));
    }
/**
   * D3执行文档关系处理(公共)
   */
    @PostMapping("implementDocRelaDisposeCom")
    public OkrResult<ImplementDocRelaDisposeComRespDto> implementDocRelaDisposeCom(@RequestBody @Validated ImplementDocRelaDisposeComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementDocRelaDisposeCom(reqDTO));
    }
/**
   * D3批量增文档及文档关系(公共)
   */
    @PostMapping("batchAddDocAndDocRelaCom")
    public OkrResult<BatchAddDocAndDocRelaComRespDto> batchAddDocAndDocRelaCom(@RequestBody @Validated BatchAddDocAndDocRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.batchAddDocAndDocRelaCom(reqDTO));
    }
/**
   * D3执行删除业务应用文档附件(公共)
   */
    @PostMapping("implementDelBusAppDocRelaCom")
    public OkrResult<ImplementDelBusAppDocRelaComRespDto> implementDelBusAppDocRelaCom(@RequestBody @Validated ImplementDelBusAppDocRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementDelBusAppDocRelaCom(reqDTO));
    }

/**
   * D3执行删资料文档附件
   */
    @PostMapping("implementDelBusAppDocRela")
    public OkrResult<ImplementDelBusAppDocRelaRespDto> implementDelBusAppDocRela(@RequestBody @Validated ImplementDelBusAppDocRelaReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementDelBusAppDocRela(reqDTO));
    }
/**
   * D3-13新增文档附件关系(公共)
   */
    @PostMapping("addDmAttRelaCom")
    public OkrResult<AddDmAttRelaComRespDto> addDmAttRelaCom(@RequestBody @Validated AddDmAttRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.addDmAttRelaCom(reqDTO));
    }
/**
   * 11111D3增单条业务应用文档关系(公共)
   */
    @PostMapping("addSingleBusAppDocRelaCom")
    public OkrResult<AddSingleBusAppDocRelaComRespDto> addSingleBusAppDocRelaCom(@RequestBody @Validated AddSingleBusAppDocRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.addSingleBusAppDocRelaCom(reqDTO));
    }
/**
   * D3删除成果文档关系业务处理(公共)
   */
    @PostMapping("deleteAchUnstrRelBizProCom")
    public OkrResult<DeleteAchUnstrRelBizProComRespDto> deleteAchUnstrRelBizProCom(@RequestBody @Validated DeleteAchUnstrRelBizProComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.deleteAchUnstrRelBizProCom(reqDTO));
    }
/**
   * D3执行准备规划相关资料文档关系(公共)
   */
    @PostMapping("implementPerpareDataDocRelOrDocCom")
    public OkrResult<ImplementPerpareDataDocRelOrDocComRespDto> implementPerpareDataDocRelOrDocCom(@RequestBody @Validated ImplementPerpareDataDocRelOrDocComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementPerpareDataDocRelOrDocCom(reqDTO));
    }
/**
   * D3执行分析是否结果文档(公共)
   */
    @PostMapping("implementAnalyzeIsResultDocCom")
    public OkrResult<ImplementAnalyzeIsResultDocComRespDto> implementAnalyzeIsResultDocCom(@RequestBody @Validated ImplementAnalyzeIsResultDocComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementAnalyzeIsResultDocCom(reqDTO));
    }
/**
   * D3执行按身份人员查目标下网盘内容列表(公共)
   */
    @PostMapping("implementTargetNetDiskContentByOriRoleMemCom")
    public OkrResult<ImplementTargetNetDiskContentByOriRoleMemComRespDto> implementTargetNetDiskContentByOriRoleMemCom(@RequestBody @Validated ImplementTargetNetDiskContentByOriRoleMemComReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        ImplementTargetNetDiskContentByOriRoleMemComRespDto retData = unstructuredDataService.implementTargetNetDiskContentByOriRoleMemCom(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);

    }
/**
   * D3执行按身份人员查目标下网盘文档列表(公共)
   */
    @PostMapping("implementTargetNetDiskDocByOriRoleMemCom")
    public OkrResult<ImplementTargetNetDiskDocByOriRoleMemComRespDto> implementTargetNetDiskDocByOriRoleMemCom(@RequestBody @Validated ImplementTargetNetDiskDocByOriRoleMemComReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        ImplementTargetNetDiskDocByOriRoleMemComRespDto retData = unstructuredDataService.implementTargetNetDiskDocByOriRoleMemCom(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);

    }
/**
   * D3执行按部门查目标下网盘内容列表(公共)
   */
    @PostMapping("implementTargetNetDiskContentByDeptIdCom")
    public OkrResult<ImplementTargetNetDiskContentByDeptIdComRespDto> implementTargetNetDiskContentByDeptIdCom(@RequestBody @Validated ImplementTargetNetDiskContentByDeptIdComReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        ImplementTargetNetDiskContentByDeptIdComRespDto retData = unstructuredDataService.implementTargetNetDiskContentByDeptIdCom(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);

    }
/**
   * D3执行按部门查目标下网盘文档列表(公共)
   */
    @PostMapping("implementTargetNetDiskDocByDeptIdCom")
    public OkrResult<ImplementTargetNetDiskDocByDeptIdComRespDto> implementTargetNetDiskDocByDeptIdCom(@RequestBody @Validated ImplementTargetNetDiskDocByDeptIdComReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        ImplementTargetNetDiskDocByDeptIdComRespDto retData = unstructuredDataService.implementTargetNetDiskDocByDeptIdCom(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);

    }
/**
   * D3新增目标下汇报成果文档关系(公共)
   */
    @PostMapping("addTargetReportAchievementDocAndDocRelaCom")
    public OkrResult<AddTargetReportAchievementDocAndDocRelaComRespDto> addTargetReportAchievementDocAndDocRelaCom(@RequestBody @Validated AddTargetReportAchievementDocAndDocRelaComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.addTargetReportAchievementDocAndDocRelaCom(reqDTO));
    }
/**
   * D3查询目标下成果网盘中基层目标周期导航列表(公共)
   */
    @PostMapping("queryTargetNetDiskMidOrGrassrootsPlanTargetCycleMenuListCom")
    public OkrResult<QueryTargetNetDiskMidOrGrassrootsPlanTargetCycleMenuListComRespDto> queryTargetNetDiskMidOrGrassrootsPlanTargetCycleMenuListCom(@RequestBody @Validated QueryTargetNetDiskMidOrGrassrootsPlanTargetCycleMenuListComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.queryTargetNetDiskMidOrGrassrootsPlanTargetCycleMenuListCom(reqDTO));
    }
/**
   * D3查询目标内容成果对接文档列表(公共)
   */
    @PostMapping("queryTargetContAchievementDockDocListCom")
    public OkrResult<QueryTargetContAchievementDockDocListComRespDto> queryTargetContAchievementDockDocListCom(@RequestBody @Validated QueryTargetContAchievementDockDocListComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.queryTargetContAchievementDockDocListCom(reqDTO));
    }
/**
   * D3查询目标内容树文档关系实例列表(公共)
   */
    @PostMapping("queryTargetContTreeUnstructuredRelationshipInstanceListCom")
    public OkrResult<QueryTargetContTreeUnstructuredRelationshipInstanceListComRespDto> queryTargetContTreeUnstructuredRelationshipInstanceListCom(@RequestBody @Validated QueryTargetContTreeUnstructuredRelationshipInstanceListComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.queryTargetContTreeUnstructuredRelationshipInstanceListCom(reqDTO));
    }
/**
   * D3执行按工作周期查目标下网盘文档列表(公共)
   */
    @PostMapping("implementTargetNetDiskDocByTargetCycleIdCom")
    public OkrResult<ImplementTargetNetDiskDocByTargetCycleIdComRespDto> implementTargetNetDiskDocByTargetCycleIdCom(@RequestBody @Validated ImplementTargetNetDiskDocByTargetCycleIdComReqDto reqDTO){
    return OkrResult.success(unstructuredDataService.implementTargetNetDiskDocByTargetCycleIdCom(reqDTO));
    }
///**
//   * D3查询目标内容当前或全部文档关系实例列表(公共)
//   */
//    @PostMapping("queryTargetContCurOrAllUnstructuredRelationshipInstanceListCom")
//    public OkrResult<QueryTargetContCurOrAllUnstructuredRelationshipInstanceListComRespDto> queryTargetContCurOrAllUnstructuredRelationshipInstanceListCom(@RequestBody @Validated QueryTargetContCurOrAllUnstructuredRelationshipInstanceListComReqDto reqDTO){
//    return OkrResult.success(unstructuredDataService.queryTargetContCurOrAllUnstructuredRelationshipInstanceListCom(reqDTO));
//    }

}
